import request from '@/utils/request'

// 查询文件信息列表
export function listUpload(query) {
  return request({
    url: '/dr/upload/list',
    method: 'get',
    params: query
  })
}
// 查询项目文件信息列表
export function listByProjectUpload(query) {
  return request({
    url: '/dr/upload/listByProject',
    method: 'get',
    params: query
  })
}

// 查询文件信息详细
export function getUpload(fileId) {
  return request({
    url: '/dr/upload/' + fileId,
    method: 'get'
  })
}

// 新增文件信息
export function addUpload(data) {
  return request({
    url: '/dr/upload',
    method: 'post',
    data: data
  })
}

// 修改文件信息
export function updateUpload(data) {
  return request({
    url: '/dr/upload',
    method: 'put',
    data: data
  })
}

// 删除文件信息
export function delUpload(fileId) {
  return request({
    url: '/dr/upload/' + fileId,
    method: 'delete'
  })
}
